58f32cf
@@ -192,6 +192,8 @@
import org.jboss.security.authentication.JBossCachedAuthenticationManager;
  */
 public class UndertowDeploymentInfoService implements Service<DeploymentInfo> {
 
+    private static final boolean JAVA_EE_8 = Boolean.getBoolean("ee8.preview.mode");
+
     public static final ServiceName SERVICE_NAME = ServiceName.of("UndertowDeploymentInfoService");
 
     public static final String DEFAULT_SERVLET_NAME = "default";
@@ -276,6 +278,12 @@
public class UndertowDeploymentInfoService implements Service<DeploymentInfo> {
 
             deploymentInfo.setConfidentialPortManager(getConfidentialPortManager());
 
+            if(!JAVA_EE_8) {
+                //in EE7 mode we need to act as a Servlet 3.1 container
+                deploymentInfo.setContainerMinorVersion(1);
+                deploymentInfo.setContainerMajorVersion(3);
+            }
+
             handleDistributable(deploymentInfo);
             if (securityFunction.getOptionalValue() == null) {
                 handleIdentityManager(deploymentInfo);
